fix(oci): identify signature verification requests - #11244
Merged
Conversation
Signed backend verification performs separate registry requests for manifests and referrers. Reuse LocalAI's version-aware User-Agent there so the full install flow is attributable to LocalAI. Assisted-by: Codex:gpt-5
mudler
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the remaining registry request path from #6258. Ordinary OCI pulls already send the version-aware LocalAI User-Agent, but signed backend verification performs separate manifest, referrer, and signature artifact requests that still advertised only
go-containerregistry.The change centralizes the existing version-aware string in
internal, preservesoci.UserAgent(), and applies it to everycosignverify.Verifierremote option. A deterministic regression spec exercises a realremote.Headrequest through a recording transport.Fixes #6258
Notes for Reviewers
go test ./internal ./pkg/oci/cosignverifygo test ./pkg/oci/cosignverify ./pkg/oci -ginkgo.focus='User-Agent|UserAgent'\n-go vet ./internal ./pkg/oci/cosignverify\n- The broadergo test ./pkg/oci/...baseline includes three live-network specs that receive HTTP 403 from Docker Hub/Ollama in this environment; the affected packages and deterministic specs pass.\n\n**Signed commits**\n- [ ] Yes, I signed my commits.\n- [x] Documentation updated (docs/content/) for user-facing changes, or not applicable